package com.yt.lxh.model.activity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yt.lxh.enums.CouponUseStatus;
import com.yt.lxh.model.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
@ApiModel(description = "优惠券领取记录表")
@TableName("coupon_use")
public class CouponUse extends BaseEntity {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "购物券ID")
	@TableField("coupon_id")
	private String couponId;

	@ApiModelProperty(value = "用户ID")
	@TableField("user_id")
	private String userId;

	@ApiModelProperty(value = "优惠券使用状态；0(未使用) 1(已使用)")
	@TableField("use_status")
	private CouponUseStatus useStatus;

	@ApiModelProperty(value = "领券时间")
	@TableField("get_time")
	@JsonFormat(pattern = "yyyy-MM-dd HH-mm-ss")
	private Date getTime;

	@ApiModelProperty(value = "使用时间")
	@TableField("used_time")
	@JsonFormat(pattern = "yyyy-MM-dd HH-mm-ss")
	private Date usedTime;

	@ApiModelProperty(value = "支付时间")
	@TableField("pay_time")
	@JsonFormat(pattern = "yyyy-MM-dd HH-mm-ss")
	private Date payTime;

	@ApiModelProperty(value = "过期时间")
	@TableField("expire_time")
	@JsonFormat(pattern = "yyyy-MM-dd HH-mm-ss")
	private Date expireTime;

}

